<form id="autoordersviewfm" method="post" style="padding:0 8px 0 0;">
    <input type="hidden" name="id" v-model="params.id"/>
    <table border="0" width="100%" cellspacing="1" cellpadding="5" class="formtable">

        <tr bgcolor="#FFFFFF">
            <td class="tlabel">订单编号：</td>
            <td><input name="title" v-model="params.order_no" readonly type="text" style="width:400px;"
                       class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox"
                       placeholder="订单编号.."></td>
            <td class="tlabel">订单日期：</td>
            <td><input name="title" v-model="params.created_at" readonly type="text" style="width:400px;"
                       class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox"
                       placeholder="订单日期.."></td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">车牌号：</td>
            <td>
                <input type="text" v-model="params.car_no" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">车架号：</td>
            <td>
                <input type="text" v-model="params.vin_no" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">车辆类型：</td>
            <td>
                <input type="text" v-model="params.car_type" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">车座数：</td>
            <td>
                <input type="text" v-model="params.car_seat" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">注册日期：</td>
            <td>
                <input type="text" v-model="params.reg_date" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">联系人：</td>
            <td>
                <input type="text" v-model="params.contact" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">联系电话：</td>
            <td>
                <input type="text" v-model="params.phone" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">到站日期：</td>
            <td>
                <input type="text" v-model="params.arrival_date" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">预约时间段：</td>
            <td colspan="3">
                <input type="text" v-model="params.timeslot.slot" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">燃料类型：</td>
            <td>
                <input type="text" v-model="params.fuel_type" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">驱动方式：</td>
            <td>
                <input type="text" v-model="params.drive_type" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">车检站名称：</td>
            <td>
                <input type="text" v-model="params.company.name" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">车检站地址：</td>
            <td>
                <input type="text" v-model="params.company.address" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">客户名称：</td>
            <td>
                <input type="text" v-model="params.customer.name" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">客户电话：</td>
            <td>
                <input type="text" v-model="params.customer.phone" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">检查费用：</td>
            <td>
                <input type="text" v-model="params.inspect_fee" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">附加项目：</td>
            <td>

            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">订单总费用：</td>
            <td colspan="3">
                <input type="text" v-model="params.amount" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">订单状态：</td>
            <td colspan="3">
                <input type="text" v-model="params.status_name" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">支付方式：</td>
            <td>
                <input type="text" v-model="params.paid_type_name" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">支付日期：</td>
            <td>
                <input type="text" v-model="params.paid_at" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">流水号：</td>
            <td>
                <input type="text" v-model="params.transaction_no" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">交易单号：</td>
            <td>
                <input type="text" v-model="params.out_trade_no" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">环境评分：</td>
            <td>
                <input type="text" v-model="params.rank_env" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
            <td class="tlabel">服务评分：</td>
            <td>
                <input type="text" v-model="params.rank_sev" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">效率评分：</td>
            <td colspan="3">
                <input type="text" v-model="params.rank_eff" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td class="tlabel">评价：</td>
            <td colspan="3">
                <input type="text" v-model="params.comment" style="width:400px;"
                       class="forminput inputstyle"/>
            </td>
        </tr>
        <tr>
            <td colspan="4" bgcolor="#F4F4F4" style="border-top:#ddd 1px solid;text-align:right; padding-right:25px;">
                <div>
                    <a href="javascript:;" class="l-btn l-btn-small" id="autoordersviewclearForm"><span class="l-btn-left l-btn-icon-left"><span class="l-btn-text">关闭</span><span class="l-btn-icon icon-no">&nbsp;</span></span></a>
                </div>
            </td>
        </tr>
    </table>
</form>

<script>
    var autoordersviewVm = new Vue({
        el: '#autoordersviewfm',
        data: {
            params: JSON.parse('<?php echo $dataset;?>'),
        },
        methods: {
            init() {
            },
        }
    });
    $(function () {
        autoordersviewVm.init();
        $('#autoordersviewsubmit').click(function () {
            $.post('/admin/orders/edit', autoordersviewVm.params, function (data) {
                if (data.ret == 0) {
                    $.messager.show({
                        title: '提示',
                        msg: data.msg,
                        timeout: 3000,
                        showType: 'slide'
                    });
                    $('#autoordersviewfm').form('clear');
                    $('#rightTabs').tabs('close', '订单查看');
                    if (typeof menusReload == "function") {
                        menusReload();
                    }
                } else {
                    $.messager.alert('提示', data.msg, 'warning');
                }
            }, 'json');
        });
        $('#autoordersviewclearForm').click(function () {
            $('#autoordersviewfm').form('clear');
            $('#rightTabs').tabs('close', '订单查看');
        });
    });
</script>
